home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 2.iso / toolbox / public / xd / README < prev    next >
Text File  |  1996-11-11  |  3KB  |  56 lines

  1.                                   XD
  2.                       Hexadecimal dump and load
  3.  
  4.                             by John Walker
  5.                  Revision 1  --  December 30th, 1991
  6.  
  7. This program was created  out  of  exasperation  with  the  Unix  "od"
  8. program  which,  notwithstanding  its  acronym  of  "octal  dump" will
  9. happily make hexadecimal dumps of files but, in tribute to  the  past,
  10. refuses to display file addresses as anything other than octal.
  11.  
  12. XD is a hexadecimal file dump program without pretensions of grandeur.
  13. It  dumps files as hex bytes, optionally showing the same bytes as ISO
  14. characters,  with  non-printing  characters  (defined according to ISO
  15. 8859/1 Latin-1) rendered as periods.  File addresses are shown as  hex
  16. numbers without leading zeroes.
  17.  
  18. XD  has  a  few  more little tricks up its sleeve.  If you specify the
  19. "-l" option, XD will *read* a dump file in the same format  it  writes
  20. and create a binary file from the hex data.  This allows you to dump a
  21. binary file with XD, edit it with your  favourite  text  editor,  then
  22. make  a  new  binary  file containing whatever changes you made.  When
  23. creating a binary file, XD normally assumes you've only  changed  data
  24. in  place  (neither  expanding  nor contracting the file) and verifies
  25. file addresses to guarantee  this.   However,  if  you  set  the  "-s"
  26. (stream)  option, file addresses are ignored and you're free to insert
  27. or delete bytes at will.  These options effectively turn your existing
  28. text  editor  into a binary file editor without requiring you to learn
  29. any new commands.
  30.  
  31. Finally, the "-d" option reads a binary file and emits  a  C  language
  32. data declaration which contains the data from the file.  This is handy
  33. when you wish to embed binary data within programs.
  34.  
  35. XD is written to be as portable as possible.  It does assume that file
  36. I/O  is not subjected to end of line translation; if you're porting it
  37. to a  system  such  as  MS-DOS  which  requires  binary  files  to  be
  38. explicitly  declared,  you'll  have  to  add  code appropriate to your
  39. compiler.
  40.  
  41. AUTHOR
  42.             John Walker
  43.             Autodesk NeuchΓtel
  44.             Avenue des Champs-Montants 14b
  45.             CH-2074 MARIN
  46.             Switzerland
  47.             Usenet: kelvin@Autodesk.com
  48.             Fax:    038/33 88 15
  49.             Voice:  038/33 76 33
  50.  
  51. This program is in the public domain: "Do what thou wilt shall be  the
  52. whole  of  the  law".   I'd  appreciate receiving any bug fixes and/or
  53. enhancements,  which  I'll  incorporate  in  future  versions  of  the
  54. program.   Please leave the original attribution information intact so
  55. that credit and blame may be properly apportioned.
  56.